home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1032 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  792 b 

  1. Path: noc.tor.hookup.net!the-fix.sos.on.ca
  2. From: <xenon@the-fix.sos.on.ca>
  3. Date: Wed,10 Jan 96 20:22:42 -0500
  4. Newsgroups: comp.lang.c
  5. Subject: Trouble with file return code.
  6. Message-ID: <tcpnntpd.16.1.10.20.22.42.2781597121.333610@the-fix.sos.on.ca>
  7. Organization: the FIX - Kitchener, Ontario CANADA
  8. NNTP-Posting-Host: the-fix.sos.on.ca
  9. X-MajorTCP-Version: MajorTCP/IP [1.80-0]
  10.  
  11.        Im having some trouble getting fread to return NULL when it can't
  12. find a specific file...
  13.  
  14.          else if((ptr=fread(filename1,"rb"))!=NULL)
  15.   {
  16.        //do this }
  17.          else    {
  18.        // do that
  19.        // this never executes, even if NULL is returned.
  20. No matter the file, Null is never returned.  Although, when the variable
  21. ptr is outputed, the value shown is "0".
  22. thankx
  23. xenon@the-fix.sos.on.ca
  24.  
  25.